package cn.dlc.com.controller;

import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: dlc
 * @Date: 2021/11/26 - 11:18
 */
@RestController
@RequestMapping("user")
public class UserController {

    @GetMapping
    @PreAuthorize("hasAuthority('p1')")
    public String resource1(){
        return "资源1";
    }
}
